from langchain_core.runnables import Runnable

# Define a simple Runnable that takes a string as input and returns the string in uppercase.
class UppercaseRunnable(Runnable):
    def run(self, input: str, config: dict = None) -> str:
        return input.upper()

# Create an instance of the UppercaseRunnable.
uppercase_runnable = UppercaseRunnable()

# Run the Runnable with the input string "hello, world!".
output = uppercase_runnable.run("hello, world!")

# Print the output of the Runnable.
print(output)  # Output: HELLO, WORLD!